#include "stdafx.h"
#include <iostream>

using namespace std;

void oil(int x);

int main_auto()
{
	int texas =31;
	int year =1999;
	cout << "In main(),texas =" << texas << ",&texas =";  //31
	cout << &texas <<endl; 
	cout << "In main(),year = " << year << ",&year ="; //1999
	cout << &year <<endl;
	oil(texas);

	cout << "In main(),texas = " << texas << ",&texas = ";
	cout << &texas <<endl;
	cout << "In main(),year = " << year << ",&year  =";
	cout << &year <<endl;
	return 0;
}

void oil(int x)
{
	int texas = 5;

	cout << "In oil(),texas = " << texas << ",&texas =";  //5
	cout << &texas <<endl;
	cout << "In oil(),x = "<< x <<",&x = "; //31
	cout << &x <<endl; 
	{
		int texas = 13;
		cout << "In block(),texas = " << texas << ",&texas ="; //13
		cout << &texas <<endl;
		cout << "In block(),x = "<< x <<",&x = "; //31
		cout << &x <<endl;
	}

	cout << "Post-block texas = " << texas; //5
	cout << ",&texas = "<<&texas <<endl;
}